import Vue from 'vue'
import Router from 'vue-router'

import HelloWorld from '@/components/HelloWorld'
import test from '@/components/test'
import test1 from '@/components/test1'
import login from '@/components/login'
import index from '@/components/index'
import ercode from '@/components/ercode'
import flow from '@/components/flow'

//一般被当成页面的组件(需要进行跳页面) 是 放在 index.js 下

Vue.use(Router)
export default new Router({
  // base:'zhangfei',
  // hash模式变成history模式，去掉url的 # 号
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'ercode',
      component: flow
    },
    {
      path: '/test',
      name: 'helloworld',
      component: ercode
    },
    {
      path: '/test1',
      name: 'test1',
      component: test1
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: '/flow',
      name: 'flow',
      component: flow
    }
  
  ]
})
